{{template "header"}} {{template "top" .}}

<form action="/cat" method="get" class="form-horizontal" role="form"
	style="display: block; width: 50%; margin: 20px auto;">
	<div class="form-group">
		<label for="firstname" class="col-sm-2 control-label">标题</label>
		<div class="col-sm-10">
			<input type="text" name="title" class="form-control" id="firstname"
				placeholder="请输入用户名">
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-offset-2 col-sm-10">
			<input type="hidden" name="act" value="add">
			<button type="submit" class="btn btn-default">添加</button>
		</div>
	</div>
</form>
<table class="table table-bordered">
	<caption>分类列表</caption>
	<thead>
		<tr>
			<th>ID</th>
			<th>标题</th>
			<th>创建时间</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
		{{range .Categories}}
		<tr>
			<td>{{.Id}}</td>
			<td>{{.Title}}</td>
			<td>{{.Created}}</td>
			<td><a href="/cat?act=del&id={{.Id}}">删除</a></td>
		</tr>
		{{end}}
	</tbody>
</table>

<!--
  登录界面
<form method="post" action="/login">
<input type="text" name="username" value="luxiaofei"/><input type="password" name="password" value="123456"/>
<input type="submit" value="提交"/>
</form>-->
{{template "foot"}}
